package cn.swh.guguanjia.service.impl;

import cn.swh.guguanjia.mapper.ExamineMapper;
import cn.swh.guguanjia.service.ExamineService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import cn.swh.guguanjia.entity.Examine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class ExamineServicelmpl extends BaseServicelmpl<Examine, Long> implements ExamineService {

    @Autowired
    ExamineMapper examineMapper;

    @Override
    public PageInfo<Examine> selectPage(int pageNum, int pageSize, Map<String,Object> condition) {
        PageHelper.startPage(pageNum,pageSize);
        List<Examine> examines = examineMapper.selectPage(condition);
        PageInfo<Examine> pageInfo = new PageInfo<>(examines);
        return pageInfo;
    }
}
